extends Control


# 大子移动
func _on_移动_pressed():
	ObjectManager.soundManager.play(SoundType.button_click)
	if !GameUtils.checkIsReadyAction() || !GameUtils.checkActionEnough(SpendData.COST_BIG_MOVE):
		return
	ObjectManager.gameManager.operationManager.changeOperationType(OperationType.沙兵_move)
	visible = false
	ObjectManager.gameManager.ui.closeDesc()

# 大子攻击
func _on_攻击_pressed():
	ObjectManager.soundManager.play(SoundType.button_click)
	if !GameUtils.checkIsReadyAction() || !GameUtils.checkActionEnough(SpendData.COST_BIG_ATTACK):
		return
	ObjectManager.gameManager.operationManager.changeOperationType(OperationType.沙兵_attack)
	visible = false
	ObjectManager.gameManager.ui.closeDesc()


func _on_二转_pressed():
	ObjectManager.soundManager.play(SoundType.button_click)
	$"../转型弹框".showDialog_secondaryEvolve("沙兵")


func _on_移动_mouse_entered():
	var ui = ObjectManager.gameManager.ui as UI
	ui.wantShowDesc("移动：消耗1点能量，移动到落点")


func _on_攻击_mouse_entered():
	var ui = ObjectManager.gameManager.ui as UI
	ui.wantShowDesc("攻击：消耗2点能量，移动到落点，攻击敌方大子")


func _on_二转_mouse_entered():
	var ui = ObjectManager.gameManager.ui as UI
	ui.wantShowDesc("二转：消耗1点能量，拥有3个沙兵可转沙皇")


func _on_mouse_exited():
	var ui = ObjectManager.gameManager.ui as UI
	ui.closeDesc()
